package com.jxpanda.spring.module.wechat.component.message.pojo.general;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.jxpanda.spring.module.wechat.component.message.pojo.MsgType;
import com.jxpanda.spring.module.wechat.component.message.pojo.WechatMessage;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;

@SuperBuilder
@EqualsAndHashCode(callSuper = true)
@Data
public class WechatTextMessage extends WechatMessage {
    /**
     * 是否开启id转译，0表示否，1表示是，默认0
     */
    @JsonProperty("enable_id_trans")
    @Builder.Default
    private Integer enableIdTrans = 0;

    @JsonProperty("text")
    private Text text;

    @Override
    public String getMsgType() {
        return MsgType.TEXT.getValue();
    }

    @Data
    public static class Text {
        /**
         * 消息内容
         */
        @JsonProperty("content")
        private String content;
    }

}
